Optimal. Leaf size=415 \[ -\frac {x}{4 \left (a-\sqrt {-b^2}\right )^{2/3}}-\frac {x}{4 \left (a+\sqrt {-b^2}\right )^{2/3}}+\frac {\sqrt {3} b \text {ArcTan}\left (\frac {1+\frac {2 \sqrt [3]{a+b \tan (c+d x)}}{\sqrt [3]{a-\sqrt {-b^2}}}}{\sqrt {3}}\right )}{2 \sqrt {-b^2} \left (a-\sqrt {-b^2}\right )^{2/3} d}-\frac {\sqrt {3} b \text {ArcTan}\left (\frac {1+\frac {2 \sqrt [3]{a+b \tan (c+d x)}}{\sqrt [3]{a+\sqrt {-b^2}}}}{\sqrt {3}}\right )}{2 \sqrt {-b^2} \left (a+\sqrt {-b^2}\right )^{2/3} d}-\frac {b \log (\cos (c+d x))}{4 \sqrt {-b^2} \left (a-\sqrt {-b^2}\right )^{2/3} d}+\frac {b \log (\cos (c+d x))}{4 \sqrt {-b^2} \left (a+\sqrt {-b^2}\right )^{2/3} d}-\frac {3 b \log \left (\sqrt [3]{a-\sqrt {-b^2}}-\sqrt [3]{a+b \tan (c+d x)}\right )}{4 \sqrt {-b^2} \left (a-\sqrt {-b^2}\right )^{2/3} d}+\frac {3 b \log \left (\sqrt [3]{a+\sqrt {-b^2}}-\sqrt [3]{a+b \tan (c+d x)}\right )}{4 \sqrt {-b^2} \left (a+\sqrt {-b^2}\right )^{2/3} d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.24, antiderivative size = 415, normalized size of antiderivative = 1.00, number of steps
used = 11, number of rules used = 6, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {3566, 726, 59,
631, 210, 31} \begin {gather*} \frac {\sqrt {3} b \text {ArcTan}\left (\frac {\frac {2 \sqrt [3]{a+b \tan (c+d x)}}{\sqrt [3]{a-\sqrt {-b^2}}}+1}{\sqrt {3}}\right )}{2 \sqrt {-b^2} d \left (a-\sqrt {-b^2}\right )^{2/3}}-\frac {\sqrt {3} b \text {ArcTan}\left (\frac {\frac {2 \sqrt [3]{a+b \tan (c+d x)}}{\sqrt [3]{a+\sqrt {-b^2}}}+1}{\sqrt {3}}\right )}{2 \sqrt {-b^2} d \left (a+\sqrt {-b^2}\right )^{2/3}}-\frac {3 b \log \left (\sqrt [3]{a-\sqrt {-b^2}}-\sqrt [3]{a+b \tan (c+d x)}\right )}{4 \sqrt {-b^2} d \left (a-\sqrt {-b^2}\right )^{2/3}}+\frac {3 b \log \left (\sqrt [3]{a+\sqrt {-b^2}}-\sqrt [3]{a+b \tan (c+d x)}\right )}{4 \sqrt {-b^2} d \left (a+\sqrt {-b^2}\right )^{2/3}}-\frac {b \log (\cos (c+d x))}{4 \sqrt {-b^2} d \left (a-\sqrt {-b^2}\right )^{2/3}}+\frac {b \log (\cos (c+d x))}{4 \sqrt {-b^2} d \left (a+\sqrt {-b^2}\right )^{2/3}}-\frac {x}{4 \left (a-\sqrt {-b^2}\right )^{2/3}}-\frac {x}{4 \left (a+\sqrt {-b^2}\right )^{2/3}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 59
Rule 210
Rule 631
Rule 726
Rule 3566
Rubi steps
\begin {align*} \int \frac {1}{(a+b \tan (c+d x))^{2/3}} \, dx &=\frac {b \text {Subst}\left (\int \frac {1}{(a+x)^{2/3} \left (b^2+x^2\right )} \, dx,x,b \tan (c+d x)\right )}{d}\\ &=\frac {b \text {Subst}\left (\int \left (\frac {\sqrt {-b^2}}{2 b^2 \left (\sqrt {-b^2}-x\right ) (a+x)^{2/3}}+\frac {\sqrt {-b^2}}{2 b^2 (a+x)^{2/3} \left (\sqrt {-b^2}+x\right )}\right ) \, dx,x,b \tan (c+d x)\right )}{d}\\ &=-\frac {b \text {Subst}\left (\int \frac {1}{\left (\sqrt {-b^2}-x\right ) (a+x)^{2/3}} \, dx,x,b \tan (c+d x)\right )}{2 \sqrt {-b^2} d}-\frac {b \text {Subst}\left (\int \frac {1}{(a+x)^{2/3} \left (\sqrt {-b^2}+x\right )} \, dx,x,b \tan (c+d x)\right )}{2 \sqrt {-b^2} d}\\ &=-\frac {x}{4 \left (a-\sqrt {-b^2}\right )^{2/3}}-\frac {x}{4 \left (a+\sqrt {-b^2}\right )^{2/3}}-\frac {b \log (\cos (c+d x))}{4 \sqrt {-b^2} \left (a-\sqrt {-b^2}\right )^{2/3} d}+\frac {b \log (\cos (c+d x))}{4 \sqrt {-b^2} \left (a+\sqrt {-b^2}\right )^{2/3} d}+\frac {(3 b) \text {Subst}\left (\int \frac {1}{\sqrt [3]{a-\sqrt {-b^2}}-x} \, dx,x,\sqrt [3]{a+b \tan (c+d x)}\right )}{4 \sqrt {-b^2} \left (a-\sqrt {-b^2}\right )^{2/3} d}+\frac {(3 b) \text {Subst}\left (\int \frac {1}{\left (a-\sqrt {-b^2}\right )^{2/3}+\sqrt [3]{a-\sqrt {-b^2}} x+x^2} \, dx,x,\sqrt [3]{a+b \tan (c+d x)}\right )}{4 \sqrt {-b^2} \sqrt [3]{a-\sqrt {-b^2}} d}-\frac {(3 b) \text {Subst}\left (\int \frac {1}{\sqrt [3]{a+\sqrt {-b^2}}-x} \, dx,x,\sqrt [3]{a+b \tan (c+d x)}\right )}{4 \sqrt {-b^2} \left (a+\sqrt {-b^2}\right )^{2/3} d}-\frac {(3 b) \text {Subst}\left (\int \frac {1}{\left (a+\sqrt {-b^2}\right )^{2/3}+\sqrt [3]{a+\sqrt {-b^2}} x+x^2} \, dx,x,\sqrt [3]{a+b \tan (c+d x)}\right )}{4 \sqrt {-b^2} \sqrt [3]{a+\sqrt {-b^2}} d}\\ &=-\frac {x}{4 \left (a-\sqrt {-b^2}\right )^{2/3}}-\frac {x}{4 \left (a+\sqrt {-b^2}\right )^{2/3}}-\frac {b \log (\cos (c+d x))}{4 \sqrt {-b^2} \left (a-\sqrt {-b^2}\right )^{2/3} d}+\frac {b \log (\cos (c+d x))}{4 \sqrt {-b^2} \left (a+\sqrt {-b^2}\right )^{2/3} d}-\frac {3 b \log \left (\sqrt [3]{a-\sqrt {-b^2}}-\sqrt [3]{a+b \tan (c+d x)}\right )}{4 \sqrt {-b^2} \left (a-\sqrt {-b^2}\right )^{2/3} d}+\frac {3 b \log \left (\sqrt [3]{a+\sqrt {-b^2}}-\sqrt [3]{a+b \tan (c+d x)}\right )}{4 \sqrt {-b^2} \left (a+\sqrt {-b^2}\right )^{2/3} d}-\frac {(3 b) \text {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,1+\frac {2 \sqrt [3]{a+b \tan (c+d x)}}{\sqrt [3]{a-\sqrt {-b^2}}}\right )}{2 \sqrt {-b^2} \left (a-\sqrt {-b^2}\right )^{2/3} d}+\frac {(3 b) \text {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,1+\frac {2 \sqrt [3]{a+b \tan (c+d x)}}{\sqrt [3]{a+\sqrt {-b^2}}}\right )}{2 \sqrt {-b^2} \left (a+\sqrt {-b^2}\right )^{2/3} d}\\ &=-\frac {x}{4 \left (a-\sqrt {-b^2}\right )^{2/3}}-\frac {x}{4 \left (a+\sqrt {-b^2}\right )^{2/3}}+\frac {\sqrt {3} b \tan ^{-1}\left (\frac {1+\frac {2 \sqrt [3]{a+b \tan (c+d x)}}{\sqrt [3]{a-\sqrt {-b^2}}}}{\sqrt {3}}\right )}{2 \sqrt {-b^2} \left (a-\sqrt {-b^2}\right )^{2/3} d}-\frac {\sqrt {3} b \tan ^{-1}\left (\frac {1+\frac {2 \sqrt [3]{a+b \tan (c+d x)}}{\sqrt [3]{a+\sqrt {-b^2}}}}{\sqrt {3}}\right )}{2 \sqrt {-b^2} \left (a+\sqrt {-b^2}\right )^{2/3} d}-\frac {b \log (\cos (c+d x))}{4 \sqrt {-b^2} \left (a-\sqrt {-b^2}\right )^{2/3} d}+\frac {b \log (\cos (c+d x))}{4 \sqrt {-b^2} \left (a+\sqrt {-b^2}\right )^{2/3} d}-\frac {3 b \log \left (\sqrt [3]{a-\sqrt {-b^2}}-\sqrt [3]{a+b \tan (c+d x)}\right )}{4 \sqrt {-b^2} \left (a-\sqrt {-b^2}\right )^{2/3} d}+\frac {3 b \log \left (\sqrt [3]{a+\sqrt {-b^2}}-\sqrt [3]{a+b \tan (c+d x)}\right )}{4 \sqrt {-b^2} \left (a+\sqrt {-b^2}\right )^{2/3} d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.40, size = 313, normalized size = 0.75 \begin {gather*} \frac {i \left (\frac {2 \log \left (\sqrt [3]{a-i b}-\sqrt [3]{a+b \tan (c+d x)}\right )}{(a-i b)^{2/3}}-\frac {2 \log \left (\sqrt [3]{a+i b}-\sqrt [3]{a+b \tan (c+d x)}\right )}{(a+i b)^{2/3}}-\frac {2 \sqrt {3} \text {ArcTan}\left (\frac {1+\frac {2 \sqrt [3]{a+b \tan (c+d x)}}{\sqrt [3]{a-i b}}}{\sqrt {3}}\right )+\log \left ((a-i b)^{2/3}+\sqrt [3]{a-i b} \sqrt [3]{a+b \tan (c+d x)}+(a+b \tan (c+d x))^{2/3}\right )}{(a-i b)^{2/3}}+\frac {2 \sqrt {3} \text {ArcTan}\left (\frac {1+\frac {2 \sqrt [3]{a+b \tan (c+d x)}}{\sqrt [3]{a+i b}}}{\sqrt {3}}\right )+\log \left ((a+i b)^{2/3}+\sqrt [3]{a+i b} \sqrt [3]{a+b \tan (c+d x)}+(a+b \tan (c+d x))^{2/3}\right )}{(a+i b)^{2/3}}\right )}{4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.28, size = 57, normalized size = 0.14
method | result | size |
derivativedivides | \(\frac {b \left (\munderset {\textit {\_R} =\RootOf \left (\textit {\_Z}^{6}-2 a \,\textit {\_Z}^{3}+a^{2}+b^{2}\right )}{\sum }\frac {\ln \left (\left (a +b \tan \left (d x +c \right )\right )^{\frac {1}{3}}-\textit {\_R} \right )}{\textit {\_R}^{5}-\textit {\_R}^{2} a}\right )}{2 d}\) | \(57\) |
default | \(\frac {b \left (\munderset {\textit {\_R} =\RootOf \left (\textit {\_Z}^{6}-2 a \,\textit {\_Z}^{3}+a^{2}+b^{2}\right )}{\sum }\frac {\ln \left (\left (a +b \tan \left (d x +c \right )\right )^{\frac {1}{3}}-\textit {\_R} \right )}{\textit {\_R}^{5}-\textit {\_R}^{2} a}\right )}{2 d}\) | \(57\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 16201 vs.
\(2 (325) = 650\).
time = 81.71, size = 16201, normalized size = 39.04 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{\left (a + b \tan {\left (c + d x \right )}\right )^{\frac {2}{3}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 8.48, size = 1048, normalized size = 2.53 \begin {gather*} \frac {\ln \left (-\frac {486\,b^4\,{\left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}^{1/3}}{d^4}+\frac {{\left (-\frac {1{}\mathrm {i}}{d^3\,{\left (-b+a\,1{}\mathrm {i}\right )}^2}\right )}^{4/3}\,\left (486\,a^3\,b^4\,d+a^2\,b^5\,d\,486{}\mathrm {i}-b^7\,d\,486{}\mathrm {i}-486\,a\,b^6\,d+\frac {972\,a\,b^5\,{\left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}^{1/3}}{{\left (-\frac {1{}\mathrm {i}}{d^3\,{\left (-b+a\,1{}\mathrm {i}\right )}^2}\right )}^{1/3}}\right )}{d}\right )\,{\left (\frac {1}{-a^2\,d^3\,1{}\mathrm {i}+2\,a\,b\,d^3+b^2\,d^3\,1{}\mathrm {i}}\right )}^{1/3}}{2}+\ln \left (\left (\left (\frac {7776\,a\,b^5\,{\left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}^{1/3}}{d}+7776\,a\,b^4\,\left (a^2+b^2\right )\,{\left (\frac {1{}\mathrm {i}}{8\,d^3\,{\left (b+a\,1{}\mathrm {i}\right )}^2}\right )}^{1/3}\right )\,{\left (\frac {1{}\mathrm {i}}{8\,d^3\,{\left (b+a\,1{}\mathrm {i}\right )}^2}\right )}^{2/3}-\frac {972\,b^5}{d^3}\right )\,{\left (\frac {1{}\mathrm {i}}{8\,d^3\,{\left (b+a\,1{}\mathrm {i}\right )}^2}\right )}^{1/3}-\frac {486\,b^4\,{\left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}^{1/3}}{d^4}\right )\,{\left (\frac {1{}\mathrm {i}}{8\,\left (-a^2\,d^3+a\,b\,d^3\,2{}\mathrm {i}+b^2\,d^3\right )}\right )}^{1/3}+\frac {\ln \left (\frac {486\,b^4\,{\left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}^{1/3}}{d^4}+\frac {\left (-1+\sqrt {3}\,1{}\mathrm {i}\right )\,\left (\frac {972\,b^5}{d^3}-\frac {{\left (-1+\sqrt {3}\,1{}\mathrm {i}\right )}^2\,\left (\frac {7776\,a\,b^5\,{\left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}^{1/3}}{d}+1944\,a\,b^4\,\left (-1+\sqrt {3}\,1{}\mathrm {i}\right )\,\left (a^2+b^2\right )\,{\left (-\frac {1{}\mathrm {i}}{d^3\,{\left (-b+a\,1{}\mathrm {i}\right )}^2}\right )}^{1/3}\right )\,{\left (-\frac {1{}\mathrm {i}}{d^3\,{\left (-b+a\,1{}\mathrm {i}\right )}^2}\right )}^{2/3}}{16}\right )\,{\left (-\frac {1{}\mathrm {i}}{d^3\,{\left (-b+a\,1{}\mathrm {i}\right )}^2}\right )}^{1/3}}{4}\right )\,\left (-1+\sqrt {3}\,1{}\mathrm {i}\right )\,{\left (\frac {1}{-a^2\,d^3\,1{}\mathrm {i}+2\,a\,b\,d^3+b^2\,d^3\,1{}\mathrm {i}}\right )}^{1/3}}{4}-\frac {\ln \left (\frac {486\,b^4\,{\left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}^{1/3}}{d^4}-\frac {\left (1+\sqrt {3}\,1{}\mathrm {i}\right )\,\left (\frac {972\,b^5}{d^3}-\frac {{\left (1+\sqrt {3}\,1{}\mathrm {i}\right )}^2\,\left (\frac {7776\,a\,b^5\,{\left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}^{1/3}}{d}-1944\,a\,b^4\,\left (1+\sqrt {3}\,1{}\mathrm {i}\right )\,\left (a^2+b^2\right )\,{\left (-\frac {1{}\mathrm {i}}{d^3\,{\left (-b+a\,1{}\mathrm {i}\right )}^2}\right )}^{1/3}\right )\,{\left (-\frac {1{}\mathrm {i}}{d^3\,{\left (-b+a\,1{}\mathrm {i}\right )}^2}\right )}^{2/3}}{16}\right )\,{\left (-\frac {1{}\mathrm {i}}{d^3\,{\left (-b+a\,1{}\mathrm {i}\right )}^2}\right )}^{1/3}}{4}\right )\,\left (1+\sqrt {3}\,1{}\mathrm {i}\right )\,{\left (\frac {1}{-a^2\,d^3\,1{}\mathrm {i}+2\,a\,b\,d^3+b^2\,d^3\,1{}\mathrm {i}}\right )}^{1/3}}{4}+\frac {\ln \left (\frac {486\,b^4\,{\left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}^{1/3}}{d^4}+\frac {\left (-1+\sqrt {3}\,1{}\mathrm {i}\right )\,\left (\frac {972\,b^5}{d^3}-\frac {{\left (-1+\sqrt {3}\,1{}\mathrm {i}\right )}^2\,\left (\frac {7776\,a\,b^5\,{\left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}^{1/3}}{d}+3888\,a\,b^4\,\left (-1+\sqrt {3}\,1{}\mathrm {i}\right )\,\left (a^2+b^2\right )\,{\left (\frac {1{}\mathrm {i}}{8\,d^3\,{\left (b+a\,1{}\mathrm {i}\right )}^2}\right )}^{1/3}\right )\,{\left (\frac {1{}\mathrm {i}}{8\,d^3\,{\left (b+a\,1{}\mathrm {i}\right )}^2}\right )}^{2/3}}{4}\right )\,{\left (\frac {1{}\mathrm {i}}{8\,d^3\,{\left (b+a\,1{}\mathrm {i}\right )}^2}\right )}^{1/3}}{2}\right )\,\left (-1+\sqrt {3}\,1{}\mathrm {i}\right )\,{\left (\frac {1{}\mathrm {i}}{8\,\left (-a^2\,d^3+a\,b\,d^3\,2{}\mathrm {i}+b^2\,d^3\right )}\right )}^{1/3}}{2}-\frac {\ln \left (\frac {486\,b^4\,{\left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}^{1/3}}{d^4}-\frac {\left (1+\sqrt {3}\,1{}\mathrm {i}\right )\,\left (\frac {972\,b^5}{d^3}-\frac {{\left (1+\sqrt {3}\,1{}\mathrm {i}\right )}^2\,\left (\frac {7776\,a\,b^5\,{\left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}^{1/3}}{d}-3888\,a\,b^4\,\left (1+\sqrt {3}\,1{}\mathrm {i}\right )\,\left (a^2+b^2\right )\,{\left (\frac {1{}\mathrm {i}}{8\,d^3\,{\left (b+a\,1{}\mathrm {i}\right )}^2}\right )}^{1/3}\right )\,{\left (\frac {1{}\mathrm {i}}{8\,d^3\,{\left (b+a\,1{}\mathrm {i}\right )}^2}\right )}^{2/3}}{4}\right )\,{\left (\frac {1{}\mathrm {i}}{8\,d^3\,{\left (b+a\,1{}\mathrm {i}\right )}^2}\right )}^{1/3}}{2}\right )\,\left (1+\sqrt {3}\,1{}\mathrm {i}\right )\,{\left (\frac {1{}\mathrm {i}}{8\,\left (-a^2\,d^3+a\,b\,d^3\,2{}\mathrm {i}+b^2\,d^3\right )}\right )}^{1/3}}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________